# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.Interconnect do
  @moduledoc """
  Represents an Interconnect resource. An Interconnect resource is a dedicated connection between the Google Cloud network and your on-premises network. For more information, read the Dedicated Interconnect Overview.

  ## Attributes

  *   `adminEnabled` (*type:* `boolean()`, *default:* `nil`) - Administrative status of the interconnect. When this is set to true, the Interconnect is functional and can carry traffic. When set to false, no packets can be carried over the interconnect and no BGP routes are exchanged over it. By default, the status is set to true.
  *   `availableFeatures` (*type:* `list(String.t)`, *default:* `nil`) - [Output only] List of features available for this Interconnect connection, which can take one of the following values: - IF_MACSEC If present then the Interconnect connection is provisioned on MACsec capable hardware ports. If not present then the Interconnect connection is provisioned on non-MACsec capable ports and MACsec isn't supported and enabling MACsec fails.
  *   `circuitInfos` (*type:* `list(GoogleApi.Compute.V1.Model.InterconnectCircuitInfo.t)`, *default:* `nil`) - [Output Only] A list of CircuitInfo objects, that describe the individual circuits in this LAG.
  *   `creationTimestamp` (*type:* `String.t`, *default:* `nil`) - [Output Only] Creation timestamp in RFC3339 text format.
  *   `customerName` (*type:* `String.t`, *default:* `nil`) - Customer name, to put in the Letter of Authorization as the party authorized to request a crossconnect.
  *   `description` (*type:* `String.t`, *default:* `nil`) - An optional description of this resource. Provide this property when you create the resource.
  *   `expectedOutages` (*type:* `list(GoogleApi.Compute.V1.Model.InterconnectOutageNotification.t)`, *default:* `nil`) - [Output Only] A list of outages expected for this Interconnect.
  *   `googleIpAddress` (*type:* `String.t`, *default:* `nil`) - [Output Only] IP address configured on the Google side of the Interconnect link. This can be used only for ping tests.
  *   `googleReferenceId` (*type:* `String.t`, *default:* `nil`) - [Output Only] Google reference ID to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.
  *   `id` (*type:* `String.t`, *default:* `nil`) - [Output Only] The unique identifier for the resource. This identifier is defined by the server.
  *   `interconnectAttachments` (*type:* `list(String.t)`, *default:* `nil`) - [Output Only] A list of the URLs of all InterconnectAttachments configured to use this Interconnect.
  *   `interconnectType` (*type:* `String.t`, *default:* `nil`) - Type of interconnect, which can take one of the following values: - PARTNER: A partner-managed interconnection shared between customers though a partner. - DEDICATED: A dedicated physical interconnection with the customer. Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED.
  *   `kind` (*type:* `String.t`, *default:* `compute#interconnect`) - [Output Only] Type of the resource. Always compute#interconnect for interconnects.
  *   `labelFingerprint` (*type:* `String.t`, *default:* `nil`) - A fingerprint for the labels being applied to this Interconnect, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an Interconnect.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
  *   `linkType` (*type:* `String.t`, *default:* `nil`) - Type of link requested, which can take one of the following values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. Note that this field indicates the speed of each of the links in the bundle, not the speed of the entire bundle.
  *   `location` (*type:* `String.t`, *default:* `nil`) - URL of the InterconnectLocation object that represents where this connection is to be provisioned.
  *   `macsec` (*type:* `GoogleApi.Compute.V1.Model.InterconnectMacsec.t`, *default:* `nil`) - Configuration that enables Media Access Control security (MACsec) on the Cloud Interconnect connection between Google and your on-premises router.
  *   `macsecEnabled` (*type:* `boolean()`, *default:* `nil`) - Enable or disable MACsec on this Interconnect connection. MACsec enablement fails if the MACsec object is not specified.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
  *   `nocContactEmail` (*type:* `String.t`, *default:* `nil`) - Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Cloud Monitoring logs alerting and Cloud Notifications. This field is required for users who sign up for Cloud Interconnect using workforce identity federation.
  *   `operationalStatus` (*type:* `String.t`, *default:* `nil`) - [Output Only] The current status of this Interconnect's functionality, which can take one of the following values: - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to use. Attachments may be provisioned on this Interconnect. - OS_UNPROVISIONED: An Interconnect that has not completed turnup. No attachments may be provisioned on this Interconnect. - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal maintenance. No attachments may be provisioned or updated on this Interconnect. 
  *   `peerIpAddress` (*type:* `String.t`, *default:* `nil`) - [Output Only] IP address configured on the customer side of the Interconnect link. The customer should configure this IP address during turnup when prompted by Google NOC. This can be used only for ping tests.
  *   `provisionedLinkCount` (*type:* `integer()`, *default:* `nil`) - [Output Only] Number of links actually provisioned in this interconnect.
  *   `remoteLocation` (*type:* `String.t`, *default:* `nil`) - Indicates that this is a Cross-Cloud Interconnect. This field specifies the location outside of Google's network that the interconnect is connected to.
  *   `requestedFeatures` (*type:* `list(String.t)`, *default:* `nil`) - Optional. List of features requested for this Interconnect connection, which can take one of the following values: - IF_MACSEC If specified then the connection is created on MACsec capable hardware ports. If not specified, the default value is false, which allocates non-MACsec capable ports first if available. This parameter can be provided only with Interconnect INSERT. It isn't valid for Interconnect PATCH.
  *   `requestedLinkCount` (*type:* `integer()`, *default:* `nil`) - Target number of physical links in the link bundle, as requested by the customer.
  *   `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - [Output Only] Reserved for future use.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined URL for the resource.
  *   `state` (*type:* `String.t`, *default:* `nil`) - [Output Only] The current state of Interconnect functionality, which can take one of the following values: - ACTIVE: The Interconnect is valid, turned up and ready to use. Attachments may be provisioned on this Interconnect. - UNPROVISIONED: The Interconnect has not completed turnup. No attachments may be provisioned on this Interconnect. - UNDER_MAINTENANCE: The Interconnect is undergoing internal maintenance. No attachments may be provisioned or updated on this Interconnect. 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :adminEnabled => boolean() | nil,
          :availableFeatures => list(String.t()) | nil,
          :circuitInfos => list(GoogleApi.Compute.V1.Model.InterconnectCircuitInfo.t()) | nil,
          :creationTimestamp => String.t() | nil,
          :customerName => String.t() | nil,
          :description => String.t() | nil,
          :expectedOutages =>
            list(GoogleApi.Compute.V1.Model.InterconnectOutageNotification.t()) | nil,
          :googleIpAddress => String.t() | nil,
          :googleReferenceId => String.t() | nil,
          :id => String.t() | nil,
          :interconnectAttachments => list(String.t()) | nil,
          :interconnectType => String.t() | nil,
          :kind => String.t() | nil,
          :labelFingerprint => String.t() | nil,
          :labels => map() | nil,
          :linkType => String.t() | nil,
          :location => String.t() | nil,
          :macsec => GoogleApi.Compute.V1.Model.InterconnectMacsec.t() | nil,
          :macsecEnabled => boolean() | nil,
          :name => String.t() | nil,
          :nocContactEmail => String.t() | nil,
          :operationalStatus => String.t() | nil,
          :peerIpAddress => String.t() | nil,
          :provisionedLinkCount => integer() | nil,
          :remoteLocation => String.t() | nil,
          :requestedFeatures => list(String.t()) | nil,
          :requestedLinkCount => integer() | nil,
          :satisfiesPzs => boolean() | nil,
          :selfLink => String.t() | nil,
          :state => String.t() | nil
        }

  field(:adminEnabled)
  field(:availableFeatures, type: :list)
  field(:circuitInfos, as: GoogleApi.Compute.V1.Model.InterconnectCircuitInfo, type: :list)
  field(:creationTimestamp)
  field(:customerName)
  field(:description)

  field(:expectedOutages,
    as: GoogleApi.Compute.V1.Model.InterconnectOutageNotification,
    type: :list
  )

  field(:googleIpAddress)
  field(:googleReferenceId)
  field(:id)
  field(:interconnectAttachments, type: :list)
  field(:interconnectType)
  field(:kind)
  field(:labelFingerprint)
  field(:labels, type: :map)
  field(:linkType)
  field(:location)
  field(:macsec, as: GoogleApi.Compute.V1.Model.InterconnectMacsec)
  field(:macsecEnabled)
  field(:name)
  field(:nocContactEmail)
  field(:operationalStatus)
  field(:peerIpAddress)
  field(:provisionedLinkCount)
  field(:remoteLocation)
  field(:requestedFeatures, type: :list)
  field(:requestedLinkCount)
  field(:satisfiesPzs)
  field(:selfLink)
  field(:state)
end

defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.Interconnect do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.Interconnect.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.Interconnect do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
